<template>
  <div>
    <!-- 4.自定义封装底部tabbar组件，点击tab跳转对应页面并高亮展示 -->
    <van-tabbar v-model="props.index">
      <van-tabbar-item to="/home">首页</van-tabbar-item>
      <van-tabbar-item to="/sc">商城</van-tabbar-item>
      <van-tabbar-item to="/xx">消息</van-tabbar-item>
      <van-tabbar-item to="/my">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script setup>
import { ref,defineProps } from "vue";
// const active = ref(0);
const props = defineProps(['index'])
</script>
<style scoped lang='scss'>
</style>